<!doctype html>
<html>

<head>
  <meta charset="utf-8">
  <title>首页_个人博客</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="shortcut icon" href="/static/images/bitbug_favicon.ico" type="image/x-icon" />
  <link href="/static/css/base.css" rel="stylesheet">
  <link href="/static/css/index.css" rel="stylesheet">
  <link href="/static/css/m.css" rel="stylesheet">
  <script src="/static/js/jquery.min.js" type="text/javascript"></script>
  <script src="/static/js/jquery.easyfader.min.js"></script>
  <script src="/static/js/scrollReveal.js"></script>
  <script src="/static/js/common.js"></script>
</head>

<body>
  <header id="header">
    <!--menu begin-->
    <div class="menu">
      <nav class="nav" id="topnav">
        <h1 class="logo"><a href="/index">个人博客</a></h1>
        <li><a href="/index">网站首页</a> </li>
        <li><a href="/list">文章列表</a>
          <ul class="sub-nav">
              {% for category in params.categories %}
                  <li>
                      <a href="/list?category_id={{ category.id }}">{{ category.cate_name }}</a>
                  </li>
              {% endfor %}
          </ul>
        </li>
        <li><a href="/photo">我的相册</a>
        </li>
        <li><a href="/time">时间轴</a> </li>
        <li><a href="/about">关于我</a> </li>
        <li><a href="/release">发表博客</a></li>
        <li><a href="/gbook">留言</a> </li>
      </nav>
    </div>
    {% if session.uid and session.uname %}
      <a id="login" target="_blank">欢迎:{{ session.uname }}</a>
      <a href="/logout" id="register" target="_blank">退出</a>
    {% else %}
      <a href="/login" id="login" target="_blank">登录</a>
      <a href="/register" id="register" target="_blank">注册</a>
    {% endif %}
    <!--menu end-->
    <!--mnav begin-->
    <div id="mnav">
      <h2><a href="/main" class="mlogo">个人博客</a><span class="navicon"></span></h2>
      <dl class="list_dl">
        <dt class="list_dt"> <a href="/main">网站首页</a> </dt>
        <dt class="list_dt"> <a href="#">文章列表</a> </dt>
        <dd class="list_dd">
          <ul>
              {% for category in params.categories %}
              <li>
                  <a href="/list">{{ category.cate_name }}</a>
              </li>
              {% endfor %}
          </ul>
        </dd>
        <dt class="list_dt"> <a href="/photo">我的相册</a> </dt>
        <dt class="list_dt"> <a href="/time">时间轴</a> </dt>
        <dt class="list_dt"> <a href="/gbook">留言</a> </dt>
        <dt class="list_dt"> <a href="/about">关于我</a> </dt>
      </dl>
    </div>
    <!--mnav end-->

  </header>
  <article>
    <!--banner begin-->
    <div class="picsbox">
      <div class="banner">
        <div id="banner" class="fader">
            {% for topic in params.topics[0:3] %}
                <li class="slide">
                    <a href="/info?topic_id={{ topic.id }}" target="_blank">
                        <img src="/static/{{ topic.images }}">
                        <span class="imginfo">{{ topic.title }}</span>
                    </a>
                </li>
            {% endfor %}
          <div class="fader_controls">
            <div class="page prev" data-target="prev">&lsaquo;</div>
            <div class="page next" data-target="next">&rsaquo;</div>
            <ul class="pager_list">
            </ul>
          </div>
        </div>
      </div>
      <!--banner end-->
      <div class="toppic">
          {% for topic in params.topics[3:5] %}
              <li>
                  <a href="/info" target="_blank">
                    <i><img src="/static/{{ topic.images }}"></i>
                    <h2>{{ topic.title }}</h2>
                    <span>{{ topic.category.cate_name }}</span>
                  </a>
              </li>
          {% endfor %}
      </div>
    </div>
    <div class="blank"></div>
    <!--blogsbox begin-->
    <div class="blogsbox">
        {% for topic in params.topicList %}
            <div class="blogs" data-scroll-reveal="enter bottom over 1s">
                <h3 class="blogtitle"><a href="/info?topic_id={{ topic.id }}" target="_blank">{{ topic.title }}</a></h3>
                {% if topic.images %}
                <span  class="blogpic"><a href="/info?topic_id={{ topic.id }}" title=""><img src="/static/{{ topic.images }}" alt=""></a></span>
                {% endif %}
                <p class="blogtext">{{ topic.content|truncate(200,true) }}</p>
                <div class="bloginfo">
                  <ul>
                    <li class="author"><a href="/info">{{ topic.user.user_name }}</a></li>
                    <li class="lmname"><a href="/info">{{ topic.category.cate_name }}</a></li>
                    <li class="timer">{{ topic.pub_date.strftime("%Y-%m-%d") }}</li>
                    <li class="view"><span>{{ topic.read_num }}</span>已阅读</li>
                    <li class="like">{{ topic.voke_users.count() }}</li>
                  </ul>
                </div>
            </div>
        {% endfor %}
    </div>
    <!--blogsbox end-->
    <div class="sidebar">
      <div class="zhuanti">
        <h2 class="hometitle">特别推荐</h2>
        <ul>
          <li> <i><img src="/static/images/banner03.jpg"></i>
            <p>Ubuntu下python开发环境配置 <span><a href="/info?topic_id=14">阅读</a></span> </p>
          </li>
          <li> <i><img src="/static/images/b04.jpg"></i>
            <p>Python基础概念_2_基础概念<span><a href="/info?topic_id=19">阅读</a></span></p>
          </li>
          <li> <i><img src="/static/images/b05.jpg"></i>
            <p>Python之if判断语句与while和for循环<span><a href="?topic_id=17">阅读</a></span></p>
          </li>
        </ul>
      </div>
      <div class="tuijian">
        <h2 class="hometitle">推荐文章</h2>
        <ul class="tjpic">
          <i><img src="/static/images/toppic01.jpg"></i>
          <p><a href="/info?topic_id=7">python中打开TXT文件报错</a></p>
        </ul>
        <ul class="sidenews">
          <li> <i><img src="/static/images/b05.jpg"></i>
            <p><a href="/info?topic_id=13">python学习网址以及笔记</a></p>
            <span>2018-05-13</span>
          </li>
          <li> <i><img src="/static/images/a.jpg"></i>
            <p><a href="/info?topic_id=14">Ubuntu下python开发环境配置</a></p>
            <span>2018-05-13</span>
          </li>
          <li> <i><img src="/static/images/d.jpg"></i>
            <p><a href="/info?topic_id=17">Python之if判断语句与while和for循环</a></p>
            <span>2018-05-13</span>
          </li>
        </ul>
      </div>
        <div class="tuijian">
            <h2 class="hometitle">点击排行</h2>
            <ul class="tjpic">
                {% for  topic in params.topics[0:1] %}
                <i><img src="/static/{{ topic.images }}"></i>
              <p><a href="/info?topic_id={{ topic.id }}">{{ topic.title }}</a></p>
                {% endfor %}
            </ul>
            <ul class="sidenews">
                {% for topic in params.topics[1:] %}
                    <li> <i><img src="/static/{{ topic.images }}"></i>
                    <p><a href="/info?topic_id={{ topic.id }}">{{ topic.title }}</a></p>
                    <span>{{ topic.pub_date.strftime('%Y-%m-%d') }}</span>
                    </li>
                {% endfor %}
            </ul>
          </div>
      <div class="cloud">
        <h2 class="hometitle">标签云</h2>
        <ul>
          <a href="#">python</a> <a href="#">html5</a> <a href="#">linux</a> <a href="#">AI</a>
        </ul>
      </div>
      <div class="links">
        <h2 class="hometitle">友情链接</h2>
        <ul>
          <li><a href="#" target="_blank">Python</a></li>
          <li><a href="#" target="_blank">爬虫</a></li>
          <li><a href="#" target="_blank">人工智能改变世界</a></li>
        </ul>
      </div>
      <div class="guanzhu" id="follow-us">
        <h2 class="hometitle">喜欢我 关注我！</h2>
        <ul>
          <li class="sina"><a href="#" target="_blank"><span>微信号</span>XXXXXX</a></li>
          <li class="tencent"><a href="#" target="_blank"><span>微博号</span>XXXXXX</a></li>
          <li class="qq"><a href="#" target="_blank"><span>QQ号</span>XXXXXX</a></li>
          <li class="email"><a href="#" target="_blank"><span>邮箱帐号</span>XXXXXX</a></li>
          <li class="wxgzh"><a href="#" target="_blank"><span>咨询电话</span>xxxxxxxxxxx</a></li>
        </ul>
      </div>
    </div>
  </article>
  <footer id="footer">
    <p>Design by <a href=# target="_blank">个人博客</a> <a href="#">备XXXXXXXXX号-1</a></p>
  </footer>
  <a href="#" class="cd-top">Top</a>
</body>
</html>